﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSharpAlgorithm
{
    class Iris
    {
        public Iris()
        {
            int T = GetConsole.GetInt();
            while (T-- > 0)
            {
                string word = GetConsole.GetString();
                char[] wordList = word.ToLower().ToCharArray();
                string text = GetConsole.GetString();
                char[] textList = text.ToLower().ToCharArray();

                char lastText = textList[textList.Length - 1];
                int lastTextCount = GetCountOfChar(wordList, lastText);
                for (int i = 0; i < lastTextCount; i++)
                {
                    int index = word.IndexOf(lastText);
                    CheckText(word.Substring(0, index).ToCharArray(), text.Substring(0, text.Length - 1).ToCharArray());
                }
                
            }
        }
        private int GetCountOfChar(char[] textList, char lastChar)
        {
            int count = 0;
            foreach (char c in textList)
            {
                if(c == lastChar)
                { count++; }
            }
            return count;
        }
        private int CheckText(char[] wordList, char[] textList)
        {
            return -1;
        }
    }
}
